package edu.gatech.volt2.drdoommgt.domain;
/**
 * This class represents a pharmacy (used for medical reasons)
 * 
 * @author Perron Jones
 */
public class Pharmacy 
{

	private String companyName;
	private String phone;
	private Address address;
	
	/**
	 * This default constructor sets the metadata of the pharmacy to
	 * customized default values.
	 */
	public Pharmacy()
	{
		this.companyName= "N/A";
		this.phone= "N/A";
		this.address= new Address();
	}
	
	/**
	 * This constructor sets the metadata of the pharmacy information to the
	 * information that is passed into it.
	 * 
	 * @param companyName the name of the pharmacy
	 * @param contactInformation the contact information of the pharmacy
	 * @param address the address of the pharmacy
	 */
	public Pharmacy(String companyName, String phone, Address address)
	{
		this.companyName= (companyName == null ? "N/A" : companyName);
		this.phone= (phone == null ? "N/A" : phone);
		this.address= (address == null ? new Address() : address);	
	}
	
	/**
	 * This method creates a string representation of the pharmacy information
	 * 
	 * @return a string representation of the pharmacy information
	 */
	public String toString()
	{
		String pharmacy= "Company name: " + this.companyName + "\nPhone: " + this.phone + "\nAddress:\n" + this.address.toString() + "\n";
			
		return pharmacy;
	}
	
	/**
	 * @param companyName the name of the pharmacy to set
	 */
	public void setCompanyName(String companyName)
	{
		this.companyName = companyName;
	}
	
	/**
	 * @return the name of the pharmacy
	 */
	public String getCompanyName()
	{
		return companyName;
	}

	/**
	 * @param contactInformation the contact information of the pharmacy to set
	 */
	public void setPhone(String phone)
	{
		this.phone = phone;
	}
	
	/**
	 * @return the contact information of the pharmacy
	 */
	public String getPhone()
	{
		return phone;
	}
	
	/**
	 * @param address the address of the pharmacy to set
	 */
	public void setAddress(Address address)
	{
		this.address = address;
	}
	
	/**
	 * @return the address of the pharmacy
	 */
	public Address getAddress()
	{
		return address;
	}
}
